Skip to content

refactor(companion): remove app-specific server bridge - #5810

Open
RaresKeY wants to merge 4 commits into
odysseus-dev:devfrom
RaresKeY:refactor/remove-companion-runtime
Open

refactor(companion): remove app-specific server bridge#5810
RaresKeY wants to merge 4 commits into
odysseus-dev:devfrom
RaresKeY:refactor/remove-companion-runtime

Conversation

@RaresKeY

@RaresKeY RaresKeY commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

This replaces #5681, which GitHub closed during the repository transfer and fork-network separation. The branch has been rebuilt on the current dev history; the implementation scope is unchanged.

Remove the app-specific companion router, pairing flow, runtime package, and companion-only tests from core while preserving generic API tokens, chat/model APIs, webhooks, the responsive browser UI, PWA behavior, and unrelated 2FA QR support. Existing credentials are left to the normal operator token list/revocation path because stored API-token rows do not carry reliable companion provenance.

This is the final removal slice in #5674 and should merge only after the default-deny token capability boundary in #3149.

Depends on #5809, the focused implementation for #3149.

After that prerequisite merges, this branch must be rebased and its overlapping authentication and threat-model wording reconciled before merge, including removal of the now-retired Cookbook-scope reference.

Target branch

  • This PR targets dev, not main.

Linked Issue

Fixes #5675

Part of #5674

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)
  • New feature (non-breaking — adds new behaviour)
  • Breaking change (removes the app-specific companion bridge and pairing contract)
  • Refactor / cleanup (removes retired code)
  • Documentation only
  • CI / tooling / configuration

Checklist

  • I searched open issues and open PRs and reviewed the full companion series.
  • This PR targets dev.
  • My changes are limited to the app-specific bridge/pairing surface and stale source references.
  • I ran the full app interactively. This remains a draft until the prerequisite capability work and deployment-level verification are complete.

How to Test

  1. Run python -m pytest -q tests/test_app_route_registration.py tests/test_api_token_user_route_gate.py tests/test_session_owner_attribution.py tests/test_api_chat_security.py tests/test_null_owner_gates.py. The final isolated focused run passes all 57 tests.
  2. Run python -m pytest -q tests/test_task_scheduler_session_delivery.py. Both isolated scheduler regressions pass.
  3. Confirm no /api/companion/* route is registered and the pairing endpoint is unavailable.
  4. Confirm generic /api/v1/chat, /api/models, Codex/Claude, webhook, responsive web/PWA, API-token CRUD, and 2FA QR behavior remain registered and covered.
  5. Run python -m pytest -q. The runtime-removal head completed with 4,633 passing and 5 skipped tests, versus 4,664 passing and 5 skipped on clean current dev; the 31-test difference was exactly the removed companion-only suite. The final review follow-up adds five passing generic regression tests without changing runtime code. Both full runs have the same 12 runner/baseline failures: the omitted .env.example, one offline URL-join check, two backup-recovery checks, and eight offline web-fetch checks.

Visual / UI changes — REQUIRED if you touched anything that renders

Not applicable. This removes an app-specific backend surface and tests; it does not change the responsive web UI.

@github-actions github-actions Bot added the ready for review Description complete — ready for maintainer review label Jul 28, 2026
@RaresKeY
RaresKeY marked this pull request as ready for review July 28, 2026 16:57
@github-actions github-actions Bot added merge conflict Conflicts with the base branch; needs a rebase before review. ready for review Description complete — ready for maintainer review and removed ready for review Description complete — ready for maintainer review labels Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Conflicts with the base branch; needs a rebase before review. ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

companion: remove the server bridge and pairing surface

1 participant